x86 hvm: don't set periodical timer again until its IRQ is delivered.
Modern Windows OS (ex XP,2003,2008) never use the PIT timer,
and neither cpu#0's LAPIC timer after boot.
Despite that, xen emulates them busily. It's inefficient.
With this patch, setting a timer is defered while its IRQ is masked.
The reasons why pt_timer_fn() simply calls vcpu_kick() are:
- checking by pt_irq_masked() is duplicated. pt_update_irq() also
does.
- pt_timer_fn() is likely called on the same processor
as pt->vcpu->processor. Hence vcpu_kick() hardly send IPI.
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>